(function () {
	CKEDITOR.plugins.add('screenshot', {
		init: function (editor) {
			editor.addCommand('screenshot', {
				exec: function () {
					try {
						var imageUrl = window.external.Screenshot();
						if (imageUrl != '') {
							editor.insertHtml('<img src="file:///' + imageUrl + '" />');
						}
					} catch (e) { }

				}
			});
			editor.ui.addButton('Screenshot', {
				label: '屏幕截图',
				icon: this.path + 'screenshot.png',
				command: 'screenshot'
			});
		}
	});
})();

